package io.github.biezhi.elves.bidding.model;

import lombok.Data;

/**
 * 解析公告查询条件
 *
 */
@Data
public class ResolveBiddingQuery {
	//当前页码
	private Integer size = 1;
	//每页显示数量
	private Integer pageNo = 100;
	//网站名称
	private String siteName;
	
	public ResolveBiddingQuery() {}
	public ResolveBiddingQuery(Integer size, String siteName) {
		this.size = size;
		this.siteName = siteName;
	}
	
	public Integer getSize() {
		Integer size = this.size;
		if(size > 0 && this.pageNo > 0) {
			size = (size - 1) * this.pageNo;
			return size;
		}
		return 0;
	}
}